﻿<navigation:Page
x:Class="MedLink2011.Views.Patients.Controls.ClinicChartsControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
mc:Ignorable="d"
x:Name="ClinicChartsUI"
Background="AliceBlue"
xmlns:E2C="clr-namespace:MedLink2011.Core"
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
xmlns:viewModels="clr-namespace:MedLink2011.Views.Patients.ViewModels" 
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
xmlns:appControls="clr-namespace:MedLink2011.Controls" 
xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" 
xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" 
xmlns:GridView="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView" 
    xmlns:telerik2="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" 
    xmlns:ClinicChartsControls="clr-namespace:MedLink2011.Views.ClinicCharts.Controls">
    <!--8 Fields -->
    <UserControl.Resources>
        <viewModels:ClinicChartViewModel x:Key="ClinicChartViewModel" ></viewModels:ClinicChartViewModel>
        <LinearGradientBrush x:Key="Windows7RowBackground" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFF7FBFF"/>
            <GradientStop Color="#FFDCE7F5" Offset="1"/>
            <GradientStop Color="#FFDFE9F6" Offset="0.494"/>
        </LinearGradientBrush>
        <ControlTemplate x:Key="MyCustomTelerikRowTemplate" TargetType="GridView:GridViewRow">
            <Border x:Name="rowsContainer" BorderBrush="#FFA0AFC3"
 Background="{StaticResource Windows7RowBackground}" BorderThickness="0,0,0,1">
                <Grid Width="Auto" HorizontalAlignment="Stretch">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.Column="0" Grid.Row="0" Orientation="vertical" Margin="5" >
                        <TextBlock Height="20"  Text="Clinic Chart Id:"  HorizontalAlignment="Left" Margin="1" VerticalAlignment="Center" MaxWidth="180" TextWrapping="NoWrap" />
                        <TextBlock Height="20"  Text="Clinic Chart Description:"  HorizontalAlignment="Left" Margin="1" VerticalAlignment="Center" MaxWidth="180" TextWrapping="NoWrap"  />
                        <TextBlock Height="20"  Text="Clinic Chart Extra Info:"  HorizontalAlignment="Left" Margin="1" VerticalAlignment="Center" MaxWidth="180" TextWrapping="NoWrap"  />
                    </StackPanel>
                    <StackPanel  Grid.Column="1" Grid.Row="0" Orientation="vertical" Margin="5" >
                        <TextBlock  Height="20" telerik1:StyleManager.Theme="Windows7" HorizontalAlignment="Left" Margin="1"  Text="{Binding ClinicChart_Id}" VerticalAlignment="Center" MaxWidth="180" FontWeight="Bold" TextWrapping="NoWrap" />
                        <TextBlock  Height="20" telerik1:StyleManager.Theme="Windows7" HorizontalAlignment="Left" Margin="1"  Text="{Binding Clinic_Chart_Description}" VerticalAlignment="Center" MaxWidth="180" FontWeight="Bold" TextWrapping="NoWrap" />
                        <TextBlock  Height="20" telerik1:StyleManager.Theme="Windows7" HorizontalAlignment="Left" Margin="1"  Text="{Binding Clinic_Chart_Extra_info}" VerticalAlignment="Center" MaxWidth="180" FontWeight="Bold" TextWrapping="NoWrap" />
                    </StackPanel>
                </Grid>
            </Border>
        </ControlTemplate>
        <Style x:Key="rowStyle" TargetType="GridView:GridViewRow">
            <Setter Property="Template" Value="{StaticResource MyCustomTelerikRowTemplate}" />
        </Style>
    </UserControl.Resources>
    <appControls:BusyIndicator telerik1:StyleManager.Theme="Windows7" x:Name="BusyIndicator" BusyContent="Loading ClinicCharts data...." DataContext="{Binding Source={StaticResource ClinicChartViewModel}}" Foreground="SlateGray" IsBusy="{Binding IsBusy}">
        <Grid x:Name="LayoutRoot"  DataContext="{Binding Source={StaticResource ClinicChartViewModel}}">
            <Border BorderBrush="#FF505050"  BorderThickness="2"  CornerRadius="3">
                <Border.Background>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#ED71A5D8" Offset="0.8" />
                        <GradientStop Color="AliceBlue" Offset="1.09" />
                    </LinearGradientBrush>
                </Border.Background>
                <ScrollViewer x:Name="scrollViewerClinicCharts" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" >
                    <telerik2:RadTabControl BorderBrush="#FF6B9BE8"  FontFamily="Arial" AllTabsEqualHeight="True" BorderThickness="1" IsTextSearchEnabled="False" PropagateItemDataContextToContent="True">
                        <telerik2:RadTabControl.Background>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#ED71A5D8" Offset="0.8" />
                                <GradientStop Color="AliceBlue" Offset="1.09" />
                            </LinearGradientBrush>
                        </telerik2:RadTabControl.Background>
                        <telerik2:RadTabItem    Header="Cuadro Clinico" Background="#4B333333" BorderBrush="#64000000" Padding="10,2" Foreground="Black" ScrollViewer.VerticalScrollBarVisibility="Auto" VerticalContentAlignment="Top" HorizontalContentAlignment="Left" AllowDrop="False">
                            <ScrollViewer>
                                <Grid HorizontalAlignment="Left" x:Name="ClinicChartsGrid" DataContext="{Binding Source={StaticResource ClinicChartViewModel}}" VerticalAlignment="Top">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="32" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="30" />
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="60" />
                                        <ColumnDefinition Width="400*" />
                                    </Grid.ColumnDefinitions>
                                    <StackPanel Grid.Column="1" Grid.Row="1" Orientation="vertical"  >
                                        <TextBlock Height="30" ToolTipService.ToolTip="Clinic Chart Id" ToolTipService.Placement="Mouse" Text="Clinic Chart Id:"  HorizontalAlignment="Right" Margin="1" VerticalAlignment="Center" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="13" TextTrimming="None" />
                                        <TextBlock Height="30" ToolTipService.ToolTip="Clinic Chart Description" ToolTipService.Placement="Mouse" Text="Clinic Chart Description:"   HorizontalAlignment="Right" Margin="1" VerticalAlignment="Center" Foreground="#FF7635FC"  Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="13" TextTrimming="None" />
                                        <TextBlock Height="30" ToolTipService.ToolTip="Clinic Chart Extra Info" ToolTipService.Placement="Mouse" Text="Clinic Chart Extra Info:"   HorizontalAlignment="Right" Margin="1" VerticalAlignment="Center" Foreground="#FF7635FC"  Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="13" TextTrimming="None" />
                                        <TextBlock Height="30" ToolTipService.ToolTip="Patient Id" ToolTipService.Placement="Mouse" Text="Patient Id:"  HorizontalAlignment="Right" Margin="1" VerticalAlignment="Center" Foreground="#FF7635FC"  Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="13" TextTrimming="None" />
                                    </StackPanel>
                                    <StackPanel Grid.Column="2" Grid.Row="1" Orientation="vertical"  >
                                        <TextBlock  Height="30" HorizontalAlignment="Left" Margin="1" Text="{Binding CurrentClinicChart.ClinicChart_Id, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="180" FontSize="15" FontWeight="Bold" />
                                        <TextBox ToolTipService.ToolTip="Clinic Chart Description" ToolTipService.Placement="Mouse" Height="30" HorizontalAlignment="Left" Margin="1"  Text="{Binding CurrentClinicChart.Clinic_Chart_Description, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="180" FontSize="15" HorizontalContentAlignment="Left"  MaxLength="200"/>
                                        <TextBox ToolTipService.ToolTip="Clinic Chart Extra Info" ToolTipService.Placement="Mouse" Height="30" HorizontalAlignment="Left" Margin="1"  Text="{Binding CurrentClinicChart.Clinic_Chart_Extra_info, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="180" FontSize="15" HorizontalContentAlignment="Left"  MaxLength="200"/>
                                        <ComboBox  ItemsSource="{Binding PatientCollection, Mode=TwoWay}" DisplayMemberPath = "First_Name" SelectedItem="{Binding SelectedPatient, Mode=TwoWay}" x:Name="Patient_IdComboBox"  VerticalAlignment="Top" Width="180" FontSize="15" Background="#FFFCF6EA" Height="30" Foreground="Black" Margin="1">
                                            <ComboBox.BorderBrush>
                                                <SolidColorBrush Color="#FF0E1601"/>
                                            </ComboBox.BorderBrush>
                                        </ComboBox>
                                    </StackPanel>
                                    <StackPanel Grid.Column="0" Grid.Row="2" Orientation="Horizontal"  Grid.ColumnSpan="5">
                                        <Button   x:Name="printButton" Content="Imprimir" Margin="0,10,5,5" Width="100"  Height="30" HorizontalAlignment="Right" Command="{Binding PrintClinicChartCommand}"  />
                                        <Button  x:Name="addButton" Content="Agregar Nueva" Margin="5,10,5,5" Width="100"  Height="30" HorizontalAlignment="Right" Command="{Binding AddNewClinicChartCommand}" />
                                        <Button   x:Name="saveButton" Content="Guardar" Margin="5,10,5,5"  Width="100"  Height="30" HorizontalAlignment="Right" Command="{Binding SaveClinicChartCommand}"  />
                                        <Button   x:Name="deleteButton" Content="Eliminar" Margin="5,10,5,5" Width="100"  Height="30" HorizontalAlignment="Left" Command="{Binding DeleteClinicChartCommand}" />
                                    </StackPanel>
                                    <StackPanel Grid.Column="4" Grid.Row="1" Orientation="vertical"  >
                                        <!--<Controls:RadDataPager telerik1:StyleManager.Theme="Windows7" Height="33" x:Name="ClinicChartDataPager" PageSize="5" Margin="1,-5,1,1"  Source="{Binding Items, ElementName=ClinicChartDataGrid}" DisplayMode="FirstLastPreviousNext" AutoEllipsisMode="Both" NumericButtonCount="0" IsTotalItemCountFixed="True" Style="{StaticResource RadDataPagerStyle1}"/>-->
                                        <telerik:RadGridView telerik1:StyleManager.Theme="Windows7" ShowColumnHeaders="False" RowStyle="{StaticResource rowStyle}" MinHeight="100" MaxWidth="400" MaxHeight="400" ShowGroupPanel="False" CanUserFreezeColumns="False" ScrollMode="RealTime"  IsFilteringAllowed="False"   AutoGenerateColumns="False" IsReadOnly="True" GridLinesVisibility="None" DataContext="{Binding Source={StaticResource ClinicChartViewModel}}" ItemsSource="{Binding ClinicChartCollection, Mode=TwoWay}" x:Name="ClinicChartDataGrid" Style="{StaticResource  RadGridViewStyle1}"   >
                                            <i:Interaction.Triggers>
                                                <i:EventTrigger EventName="SelectionChanged">
                                                    <E2C:EventToCommand Command="{Binding SelectionChangedCommand}" PassEventArgsToCommand="True"  ></E2C:EventToCommand>
                                                </i:EventTrigger>
                                                <i:EventTrigger EventName="RowLoaded">
                                                    <E2C:EventToCommand Command="{Binding RowLoadedCommand}" PassEventArgsToCommand="True"  ></E2C:EventToCommand>
                                                </i:EventTrigger>
                                            </i:Interaction.Triggers>
                                            <telerik:RadGridView.Columns >
                                                <telerik:GridViewDataColumn x:Name="ClinicChart_IdColumn" DataMemberBinding="{Binding ClinicChart_Id}" Header="Clinic Chart Id" Width="SizeToHeader" />
                                            </telerik:RadGridView.Columns>
                                        </telerik:RadGridView>
                                    </StackPanel>
                                </Grid>
                            </ScrollViewer>
                        </telerik2:RadTabItem>
                        <telerik2:RadTabItem Header="Cardio" Background="Transparent" BorderBrush="#64000000" Padding="10,2" Foreground="Black" ScrollViewer.VerticalScrollBarVisibility="Visible">
                            <ScrollViewer>
                                <ClinicChartsControls:Evaluation_CardiosControl  />
                            </ScrollViewer>
                        </telerik2:RadTabItem>
                        <telerik2:RadTabItem Header="Constitutional" Background="#4B333333" BorderBrush="#64000000" Padding="10,2" Foreground="Black">
                            <ScrollViewer>
                                <ClinicChartsControls:Evaluation_ConstitutionalsControl  />
                            </ScrollViewer>
                        </telerik2:RadTabItem>
                        <telerik2:RadTabItem Header="Ents" Background="#4B333333" BorderBrush="#64000000" Padding="10,2" Foreground="Black">
                            <ScrollViewer>
                                <ClinicChartsControls:Evaluation_EntsControl />
                            </ScrollViewer>
                        </telerik2:RadTabItem>
                        <telerik2:RadTabItem Header="Extrems" Background="#4B333333" BorderBrush="#64000000" Padding="10,2" Foreground="Black">
                            <ScrollViewer>
                                <ClinicChartsControls:Evaluation_ExtremsControl />
                            </ScrollViewer>
                        </telerik2:RadTabItem>
                        <telerik2:RadTabItem Header="Gastro" Background="#4B333333" BorderBrush="#64000000" Padding="10,2" Foreground="Black">
                            <ScrollViewer>
                                <ClinicChartsControls:Evaluation_GastrosControl />
                            </ScrollViewer>
                        </telerik2:RadTabItem>
                        <telerik2:RadTabItem Header="Lymphs" Background="#4B333333" BorderBrush="#64000000" Padding="10,2" Foreground="Black">
                            <ScrollViewer>
                                <ClinicChartsControls:Evaluation_LymphsControl />
                            </ScrollViewer>
                        </telerik2:RadTabItem>
                        <telerik2:RadTabItem Header="Muscs" Background="#4B333333" BorderBrush="#64000000" Padding="10,2" Foreground="Black">
                            <ScrollViewer>
                                <ClinicChartsControls:Evaluation_MuscsControl />
                            </ScrollViewer>
                        </telerik2:RadTabItem>
                        <telerik2:RadTabItem Header="Cuello" Background="#4B333333" BorderBrush="#64000000" Padding="10,2" Foreground="Black">
                            <ScrollViewer>
                                <ClinicChartsControls:Evaluation_NecksControl />
                            </ScrollViewer>
                        </telerik2:RadTabItem>
                        <telerik2:RadTabItem Header="Neuros" Background="#4B333333" BorderBrush="#64000000" Padding="10,2" Foreground="Black">
                            <ScrollViewer>
                                <ClinicChartsControls:Evaluation_NeurosControl />
                            </ScrollViewer>
                        </telerik2:RadTabItem>
                        <telerik2:RadTabItem Header="Respi" Background="#4B333333" BorderBrush="#64000000" Padding="10,2" Foreground="Black">
                            <ScrollViewer>
                                <ClinicChartsControls:Evaluation_RespisControl />
                            </ScrollViewer>
                        </telerik2:RadTabItem>
                        <telerik2:RadTabItem Header="Derma" Background="#4B333333" BorderBrush="#64000000" Padding="10,2" Foreground="Black">
                            <ScrollViewer>
                                <ClinicChartsControls:Evaluation_SkinsControl />
                            </ScrollViewer>
                        </telerik2:RadTabItem>
                        <telerik2:RadTabItem Header="Enf Heredi" Background="#4B333333" BorderBrush="#64000000" Padding="10,2" Foreground="Black">
                            <ScrollViewer>
                                <ClinicChartsControls:Hereditary_IllnesControl />
                            </ScrollViewer>
                        </telerik2:RadTabItem>
                    </telerik2:RadTabControl>
                </ScrollViewer>
            </Border>
        </Grid>
        <!--</appControls:BusyIndicator>--></appControls:BusyIndicator>
</navigation:Page>
<!--

-->